var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 推荐人申请记录表
var mod = {
    usertype:{
        name: '推荐人性质',// 0，个人 1，企业
        type: 'number',
        default: 0 
    },
     // 企业微信
    qywx: {
        type: 'string',
        length: 5000
    },
    pcode: {
        name: '申请人pcode',
        type: 'string',
        length: 12
    },
    nickname: {
        name: '平台展示名称',
        type: 'string',
        length: 50
    },
    name: {
        name: '用户姓名',
        type: 'string',
        length: 50
    },
    orgname: {
        name: '单位名称',
        type: 'string',
        length: 250
    },
    inviter_name: {
        name: '推荐人姓名',
        type: 'string',
        length: 50
    },
    phone: {
        name: '用户手机号',
        type: 'string',
        length: 50
    },
    grender: {
        name: '性别',
        type: 'string',
        length: 50
    },
    marital_status: {
        name: '婚姻状态',
        type: 'string',
        length: 50
    },
    jiguan: {
        name: '籍贯',
        type: 'string',
        length: 50
    },
    education: {
        name: '学历',
        type: 'string',
        length: 50
    },
    university: {
        name: '毕业学校',
        type: 'string',
        length: 50
    },
    company: {
        name: '主体名称',
        type: 'string',
        length: 50
    },
    deparment: {
        name: '所属部门',
        type: 'string',
        length: 50
    },
    position: {
        name: '担任职位',
        type: 'string',
        length: 50
    },
    workresume: {
        name: '工作简历',
        type: 'string',
        length: 500
    },
    description: {
        name: '个人简介',
        type: 'string',
        length: 500
    },
    commit: {
        name: '审批人意见',
        type: 'string',
        length: 250
    },
    ispass: {
        name: '是否通过', // 0：未审核  1：通过  9：申请不通过
        type: 'number',
        default: 0
    },
    isconfirm: {
        name: '是否确认', // 0：未确认  1：已确认  9：已拒绝
        type: 'number',
        default: 0
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    },
    audittime: {
        name: '审批时间',
        type: 'date'
    },
    audithistory:{
        name: '审批历史',
        type: 'string',
        length: 5000
    }
};

module.exports = {
    init,
    format
};